package org.sabayframework.channel.impl;

import org.sabayframework.channel.Lock;

public abstract class WriteOnlyChannel<T> extends AbstractChannel<T> {

	public static void raiseWriteOnlyException(){
		throw new IllegalStateException("Write-only channel");
	}
	
	@Override
	public final Lock<T> getReadLock(int size) {
		raiseWriteOnlyException();
		return null;
	}

	@Override
	public final T remove() throws IllegalStateException {
		raiseWriteOnlyException();
		return null;
	}

	@Override
	public final Lock<T> waitForReadLock(int count, long timeout)	 {
		raiseWriteOnlyException();
		return null;
	}

}
